package com.gxc.service.common.components.log.model;

/**
 * @author GongXincheng
 * @since 2019-11-08 23:10
 */
public class LogManager {

    private static final ThreadLocal<GlobalAccessLog> LOG_INFO = ThreadLocal.withInitial(GlobalAccessLog::new);

    public static GlobalAccessLog getLogInfo() {
        return LOG_INFO.get();
    }

    public static void setLogInfo(GlobalAccessLog logInfo) {
        LOG_INFO.set(logInfo);
    }

    public static void clearLogInfo() {
        LOG_INFO.remove();
    }

}
